import {Component} from '@angular/core';
import {DemoDialogComponent} from "./demo/DemoDialog.component";
import {DialogService} from "primeng/api";

@Component({
  selector: 'app-button-dialog',
  templateUrl: './dialog.component.html'
})
export class DialogComponent {

  dialogType = DemoDialogComponent;

  returnData: any;

  constructor(private dialogService: DialogService) {
  }

  setValue(data: any): void {
    this.returnData = data;
  }

  open(): void {
    this.dialogService.open(this.dialogType, {});
  }

}
